package com.weibo4j.api.req.user;

import java.util.Arrays;
import java.util.List;

import com.weibo4j.api.WeiboRequest;
import com.weibo4j.api.response.user.UserStatGetResponse;
import com.weibo4j.api.util.RequestType;

public class UserStatGetRequest extends WeiboRequest<UserStatGetResponse> {

    private List<String> uidList;


    public List<String> getUidList() {
        return uidList;
    }

    public void setUidList(List<String> uidList) {
        this.uidList = uidList;
    }
    
    public String getUids() {
        if (uidList != null && !uidList.isEmpty()) {
            String ids = Arrays.toString(uidList.toArray(new String[uidList.size()]));
            return ids.substring(1, ids.length() - 1);
        } else {
            return null;
        }
    }

    @Override
    public RequestType requestType() {
        return RequestType.GET;
    }

    @Override
    public String baseUrl() {
        return "https://api.weibo.com/2/users/counts.json";
    }

    @Override
    protected Class<UserStatGetResponse> responseType() {
        return UserStatGetResponse.class;
    }

}
